package com.dushibao.annotation.test;

import com.dushibao.annotation.MyFirstAnnotation;
import lombok.Data;

import java.time.LocalDateTime;

@MyFirstAnnotation(name = "角色",value = "这个类是角色类")
@Data
public class Role {

    @MyFirstAnnotation("id")
    private Long id;

    @MyFirstAnnotation(name = "addTime")
    private LocalDateTime addTime;

    @MyFirstAnnotation(name = "name")
    private String name;

    @MyFirstAnnotation(name = "Role",value = "无参数构造方法")
    public Role(){}

    @MyFirstAnnotation(name = "Role",value = "有参数构造方法")
    public Role(Long id){
        this.id = id;
    }

    @MyFirstAnnotation(name = "Print",value = "打印方法")
    public static void print(){
        System.out.println("print....");
    }

    @MyFirstAnnotation(name = "Log",value = "日志方法")
    public void log(){
        System.out.println("log...");
    }

}
